package test;

import com.suxin.enums.Color;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.HashMap;

/**
 * @author Tang
 * @classname AA
 * @description [  ]
 * @date 2021/8/28 10:12
 */
@Slf4j
public class AA extends HashMap<String, String> {

    public static void main(String[] args) throws Exception {

        System.out.println(Color.class.isEnum());

        System.out.println(Color.class.getEnumConstants()[0]);

    }


    @Test
    public void test01() {
        LocalDateTime d1 = LocalDateTime.of(2022, 1, 8, 12, 30, 0);
        System.out.println(d1.toInstant(ZoneOffset.ofHours(8)).toEpochMilli());
        System.out.println(d1.toInstant(ZoneOffset.ofHours(8)).toEpochMilli() / (1000 * 60 * 60));
        LocalDateTime d2 = LocalDateTime.of(2022, 1, 8, 13, 30, 0);
        System.out.println(d2.toInstant(ZoneOffset.ofHours(8)).toEpochMilli());
        System.out.println(d2.toInstant(ZoneOffset.ofHours(8)).toEpochMilli() / (1000 * 60 * 60));
    }

}